package com.guodaxia.gzh.config.condition;

import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.context.annotation.Conditional;
import org.springframework.core.type.AnnotatedTypeMetadata;

/**
 * @author guojianquan
 * @date 2024/12/12 19:44
 */
public class TestTokenCondition implements Condition {
    @Override
        public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
        return "dev".equals(context.getEnvironment().getProperty("spring.profiles.active"));
    }
}
